<html xmlns:th="http://www.thymeleaf.org" >

  <head th:include="layout :: htmlhead" th:with="title='favorites'"></head>

  <body>

      <section >

         <div class="content-wrapper">

            <h3 th:if="${(favorites.name != null and favorites.name !='未读列表')or (type == 'garbage')}">

             	 <span th:if="${otherPeople != null}" th:text="${otherPeople.userName +'的收藏夹: ' + favorites.name}"></span>

             	 <span th:if="${otherPeople == null and type != 'garbage'}" th:text="${favorites.name}"></span>

               <span th:if="${otherPeople == null and type != 'garbage'}" class="title-small ml-sm mr-sm" th:text="'('+${favorites.count}+')'">(8)</span>

               <span th:if="${otherPeople != null}" class="title-small ml-sm mr-sm" th:text="'('+${favorites.publicCount}+')'">(8)</span>

               <span th:if="${type == 'garbage'}" th:text="回收站"></span>

               <span th:if="${otherPeople == null and type != 'garbage'}" data-toggle="modal" data-target="#modal-changeFavName" class="title-small clickable icon-pencil mr-sm"></span>

               <div class="pull-right" th:if="${otherPeople == null and type != 'garbage'}">

                  <span class="title-small icon-folder-alt mr-sm"></span>

                  <span data-toggle="modal" data-target="#modal-removeFav" class="title-small clickable">删除</span>

               </div>

            </h3>

            <div class="row" th:if="${type == 'garbage' and collects.size() == 0}">

               <div class="col-xs-12 text-center">

                  <h2 class="text-thin">回收站</h2>

                  <p>未读列表中的收藏30天后会自动被清理到这里。</p>

                  <p>您可以将该收藏重新换个收藏夹，就能从回收站中移出。</p>

               </div>

            </div>

            <div class="row" id="simple" th:if="${collects.size() > 0}">

               <div class="col-lg-12 col-md-12 mt">

               	   <div class="btn-group btn-xs mb pull-right" style="margin-top: -25px;">

                     <a th:if="${otherPeople == null}" class="btn btn-xs btn-default"  href="javascript:void(0);"  th:onclick="'locationUrl(\'/standard/' + ${type} + '/0\',\'\');'">

                        <span class="icon-layers"></span>

                     </a>

                     <a th:if="${otherPeople != null}" class="btn btn-xs btn-default active"  href="javascript:void(0);"  th:onclick="'locationUrl(\'/standard/' + ${type} + '/'+${otherPeople.id}+'\',\'\');'">

                        <span class="icon-layers"></span>

                     </a>

 	                 <a th:if="${otherPeople == null}" class="btn btn-xs btn-default  active" href="javascript:void(0);" th:onclick="'locationUrl(\'/simple/' + ${type} + '/0\',\'\');'" >

                        <span class="icon-list"></span>

                     </a>

                     <a th:if="${otherPeople != null}" class="btn btn-xs btn-default" href="javascript:void(0);" th:onclick="'locationUrl(\'/simple/' + ${type} + '/'+${otherPeople.id}+'\',\'\');'" >

                        <span class="icon-list"></span>

                     </a>

                  </div>

                  <table class="table">

                     <tbody  id="collectSimpleList">

                        <tr th:each="collect,collectStat : ${collects}">

                           <td>

                              <a th:onclick="'saveLookRecord(' + ${collect.id} + ');'" target="_blank" style="font-size:16px;color:#656565;" th:href="@{${collect.url}}" th:text="${collect.title}">title</a>

                           </td>

                           <td width="10%" class="text-center">

                              <img   th:src="@{(${collect.logoUrl}=='' ? '/img/favicon.png' : ${collect.logoUrl})}"  width="35px" height="25px" alt=""/></td>

                           <td width="15%" class="text-center">

                              <div>

                                 <a th:if="${userId == collect.userId}" href="javascript:void(0);" class="mr" th:onclick="'getCollect(' + ${collect.id} + ',\'\');'" > <i class="fa fa-pencil"></i>

                                 </a>

                                 <a th:if="${userId == collect.userId}" href="javascript:void(0);" class="ml" th:onclick="'onCollect(' + ${collect.id} + ',\'\');'"> <i class="fa fa-trash text-danger"></i>

                                 </a>

                              </div>

                           </td>

                        </tr>

                     </tbody>

                  </table>

                     <!-- <button id="loadSimpleNoMore" class="mt-lg btn btn-warning btn-block" style="display:none" >没有更多了</button> -->

                     <!-- <button th:if="${size == 20}"  id="loadSimpleMore" class="mt-lg btn btn-primary btn-block" th:onclick="'loadSimpleMore();'">加载更多</button> -->
                     <button  id="loadSimpleMore" class="mt-lg btn btn-primary btn-block" style="display:none;">加载更多</button>
                     <div id="loadingSimple" style="text-align:center;margin:20px;display:none;"><img src="/img/loading.gif" width="64" height="64" /></div>
                     <br />
                     <br />
                     <br />

               </div>

            </div>

             <input type="hidden" name="collectId" id="collectId" />

             <input type="hidden" name="forward" id="forward" th:value="'/simple/'+${type}+'/0'" />

             <input type="hidden" name="pageType" id="pageType" th:value="${type}" />

             <input type="hidden"  id="userId" th:value="${userId}" />

         </div>

      </section>

  </body>

  <script type='text/javascript'>

 </script>

</html>

